package com.bawei.module_publish.openlive.model.api

import com.bawei.lib_common.entity.ResponseEntity
import com.bawei.module_publish.openlive.model.entity.GoodRecord
import com.bawei.module_publish.openlive.model.entity.MyGoodsEntity
import com.bawei.module_publish.openlive.model.entity.OnlineNumEntityItem
import com.bawei.module_publish.openlive.model.entity.OpenLiveBody
import com.bawei.module_publish.openlive.model.entity.OpenLiveEntity
import com.bawei.module_publish.openlive.model.entity.SendAdInfoBody
import com.bawei.module_publish.openlive.model.entity.SendPacketBody
import com.bawei.module_publish.openlive.model.entity.SquareGoodsBody
import com.bawei.module_publish.openlive.model.entity.TopCarBody
import com.bawei.module_publish.openlive.net.API
import retrofit2.http.Body
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface LiveApi {
    @POST(API.OPEN_LIVE)
    suspend fun openLive(@Body body: OpenLiveBody): ResponseEntity<OpenLiveEntity>
    @POST(API.SEND_RED_PACKET)
    suspend fun sendRedPacket(@Body body: SendPacketBody): ResponseEntity<Boolean>
    @GET(API.GET_ONLINE_NUM)
    suspend fun getOnlineNum(@Query("roomId") roomId:String): ResponseEntity<List<OnlineNumEntityItem>>
    @POST(API.DELETE_LIVE_ROOM)
    suspend fun deleteLiveRoom(@Query("roomId") roomId:String): ResponseEntity<Boolean>
    @GET(API.MY_SHOWCASE)
    suspend fun myShowcase(): ResponseEntity<MyGoodsEntity>
    @POST(API.TOP_CAR)
    suspend fun topCar(@Body body: TopCarBody): ResponseEntity<Boolean>
    @POST(API.LIVE_ROOM_GOODS)
    suspend fun liveRoomGoods(@Query("roomId") roomId:String): ResponseEntity<MyGoodsEntity>
    @POST(API.EXPLAIN_GOODS)
    suspend fun explainGoods(@Body body: TopCarBody): ResponseEntity<Boolean>
    @POST(API.CHOOSE_PRODUCT_SQUARE)
    suspend fun chooseProductSquare(@Body body: SquareGoodsBody): ResponseEntity<MyGoodsEntity>
    @POST(API.ADD_OR_CANCEL_SHOWCASE)
    suspend fun addOrCancelShowcase(@Path("goodsId") goodsId: Int): ResponseEntity<Boolean>
    @POST(API.AD_INFO)
    suspend fun adInfo(@Body body: SendAdInfoBody): ResponseEntity<Boolean>
}